/**
 * <B>仉乾乐</B><BR>
 * <B>系统名称：spring cloud 搭建学习</B><BR>
 * <B>模块名称：feign-consumer</B><BR>
 * <B>中文类名：</B><BR>
 * <B>概要说明：</B><BR>
 * @author zhangql
 * @since 2018年12月27日
 */
package com.lele.org.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import com.lele.org.entity.User;
import com.lele.org.service.FeiConsumerService;

@RestController
public class FeiConsumerController {

	@Autowired
	private FeiConsumerService service;

	@GetMapping("/feign-consumer")
	public String feignConsumer() {
		service.hello();
		return "feign consumer call success!";

	}

	@PostMapping("/feign-consumer-user")
	public User feignConsumer2(@RequestBody User user) {
		service.hello2();
		return service.printUser(user);
	}
}
